<?php
/**
 * Created by PhpStorm.
 * User: lgm
 * Date: 2018/9/4
 * Time: 8:46
 */
use EasyWeChat\Factory;

$config = [
    'app_id' => 'wx6588a08e5d85ae6e',
    'secret' => 'f57e6a3171833d260f62183331c4701c',
    'token' => 'lgm880972',
    'response_type' => 'array',

    'log' => [
        'level' => 'debug',
        'file' => __DIR__.'/wechat.log',
    ],
];

$app = Factory::officialAccount($config);

$response = $app->server->serve();

// 将响应输出
$response->send(); // Laravel 里请使用：return $response;